/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idea.model.qnrlibrary;


import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;


/**
 *
 * @author rejun001
 */
@Entity
@Table( name = "general_lov_tm" )
@XmlRootElement
@NamedQueries( 
{
    @NamedQuery( name = "GeneralLovTm.findAll" , query = "SELECT g FROM GeneralLovTm g" ) ,
    @NamedQuery( name = "GeneralLovTm.findByLovType" , query = "SELECT g FROM GeneralLovTm g WHERE g.lovType = :lovType" ) ,
    @NamedQuery( name = "GeneralLovTm.findByDescription" , query = "SELECT g FROM GeneralLovTm g WHERE g.description = :description" ) ,
    @NamedQuery( name = "GeneralLovTm.findByCreatedBy" , query = "SELECT g FROM GeneralLovTm g WHERE g.createdBy = :createdBy" ) ,
    @NamedQuery( name = "GeneralLovTm.findByDateCreated" , query = "SELECT g FROM GeneralLovTm g WHERE g.dateCreated = :dateCreated" ) ,
    @NamedQuery( name = "GeneralLovTm.findByModifiedBy" , query = "SELECT g FROM GeneralLovTm g WHERE g.modifiedBy = :modifiedBy" ) ,
    @NamedQuery( name = "GeneralLovTm.findByDateModified" , query = "SELECT g FROM GeneralLovTm g WHERE g.dateModified = :dateModified" )
} )
public class GeneralLovTm implements Serializable
{
    private static final long serialVersionUID = 1L;
    @Id
    @Basic( optional = false )
    @Column( name = "lov_type" )
    private String lovType;
    @Column( name = "description" )
    private String description;
    @Basic( optional = false )
    @Column( name = "created_by" )
    private String createdBy;
    @Basic( optional = false )
    @Column( name = "date_created" )
    @Temporal( TemporalType.TIMESTAMP )
    private Date dateCreated;
    @Column( name = "modified_by" )
    private String modifiedBy;
    @Column( name = "date_modified" )
    @Temporal( TemporalType.TIMESTAMP )
    private Date dateModified;


    public GeneralLovTm()
    {
    }


    public GeneralLovTm( String lovType )
    {
        this.lovType = lovType;
    }


    public GeneralLovTm( String lovType , String createdBy , Date dateCreated )
    {
        this.lovType = lovType;
        this.createdBy = createdBy;
        this.dateCreated = dateCreated;
    }


    public String getLovType()
    {
        return lovType;
    }


    public void setLovType( String lovType )
    {
        this.lovType = lovType;
    }


    public String getDescription()
    {
        return description;
    }


    public void setDescription( String description )
    {
        this.description = description;
    }


    public String getCreatedBy()
    {
        return createdBy;
    }


    public void setCreatedBy( String createdBy )
    {
        this.createdBy = createdBy;
    }


    public Date getDateCreated()
    {
        return dateCreated;
    }


    public void setDateCreated( Date dateCreated )
    {
        this.dateCreated = dateCreated;
    }


    public String getModifiedBy()
    {
        return modifiedBy;
    }


    public void setModifiedBy( String modifiedBy )
    {
        this.modifiedBy = modifiedBy;
    }


    public Date getDateModified()
    {
        return dateModified;
    }


    public void setDateModified( Date dateModified )
    {
        this.dateModified = dateModified;
    }


    @Override
    public int hashCode()
    {
        int hash = 0;
        hash += ( lovType != null ? lovType.hashCode() : 0 );
        return hash;
    }


    @Override
    public boolean equals( Object object )
    {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if ( !( object instanceof GeneralLovTm ) )
        {
            return false;
        }
        GeneralLovTm other = (GeneralLovTm) object;
        if ( ( this.lovType == null && other.lovType != null ) || ( this.lovType != null && !this.lovType.equals( other.lovType ) ) )
        {
            return false;
        }
        return true;
    }


    @Override
    public String toString()
    {
        return "idea.model.qnrlibrary.GeneralLovTm[ lovType=" + lovType + " ]";
    }
    
}
